package caiziyou.com.se8.io.filereader;

import java.io.BufferedReader;
import java.io.FileReader;

public class FileReaderDemo {
	@SuppressWarnings("resource")
	public static void main(String[] args)  {
		String file = "a.txt";
		try {
			FileReader fileReader = new FileReader(file);
			BufferedReader br = new BufferedReader(fileReader);
			String line = null;
			while((line  = br.readLine())!=null) {
				System.out.println(line);
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
